package cn.com.huzo.model.entities.trade;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 发货发令单明细-引入的生产指示书记录实体类
 *
 * @author 吴旭
 */
public class DeliveryCommandSheetLinesMoEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 4564102810879692894L;
    private String LinesId;                    // 明细ID
    private Long HeaderId;                     // 所属主记录ID
    private String BillNo;                     // 发货发令单号
    private Long MoHeaderId;                   // 引入的生产指示书ID
    private String CustomerName;               // 客户
    private String StyleNo;                    // 款号
    private String SoNo;                       // 主合同号（即销售订单号）
    private Boolean DeliveryDateCtrlMark;      // 控制与生产指示书的发货期进行比较
    private Timestamp DeliveryDate;            // 发货日期，用于与交付日期比较
    private Boolean DestinationCtrlMark;       // 发货数是否受发货目的地控制
    private String Destination;                // 发货目的地控制

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getBillNo() {
        return BillNo;
    }

    public void setBillNo(String BillNo) {
        this.BillNo = BillNo;
    }

    public Long getMoHeaderId() {
        return MoHeaderId;
    }

    public void setMoHeaderId(Long MoHeaderId) {
        this.MoHeaderId = MoHeaderId;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public String getSoNo() {
        return SoNo;
    }

    public void setSoNo(String SoNo) {
        this.SoNo = SoNo;
    }

    public Boolean getDeliveryDateCtrlMark() {
        return DeliveryDateCtrlMark;
    }

    public void setDeliveryDateCtrlMark(Boolean DeliveryDateCtrlMark) {
        this.DeliveryDateCtrlMark = DeliveryDateCtrlMark;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDeliveryDate() {
        return DeliveryDate;
    }

    public void setDeliveryDate(Timestamp DeliveryDate) {
        this.DeliveryDate = DeliveryDate;
    }

    public Boolean getDestinationCtrlMark() {
        return DestinationCtrlMark;
    }

    public void setDestinationCtrlMark(Boolean DestinationCtrlMark) {
        this.DestinationCtrlMark = DestinationCtrlMark;
    }

    public String getDestination() {
        return Destination;
    }

    public void setDestination(String Destination) {
        this.Destination = Destination;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof DeliveryCommandSheetLinesEntity)) {
            return false;
        }

        final DeliveryCommandSheetLinesEntity that = (DeliveryCommandSheetLinesEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
